<!DOCTYPE html><html lang="zh-CN"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="theme-color" content="black"><meta name="author" content="李子康"><meta name="copyright" content="李子康"><meta name="generator" content="Hexo 4.2.1"><meta name="theme" content="hexo-theme-yun"><title>数据结构 第8讲 最小生成树、最短路、关键路径 | Lizikang_Blog</title><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@900&amp;display=swap" media="none" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/star-markdown-css@0.1.11/dist/yun/yun-markdown.min.css"><script src="//at.alicdn.com/t/font_1140697_stqaphw3j4.js" async></script><script src="https://cdn.jsdelivr.net/npm/scrollreveal/dist/scrollreveal.min.js" defer></script><script>document.addEventListener("DOMContentLoaded", () => {
  [".post-card",".post-content img"].forEach((target)=> {
    ScrollReveal().reveal(target);
  })
});
</script><script src="https://cdn.jsdelivr.net/npm/pjax@latest/pjax.min.js" defer></script><script src="/js/pjax.js" defer></script><link rel="shortcut icon" type="image/svg+xml" href="/images/%E7%9A%AE%E5%8D%A1%E4%B8%98-2.ico"><link rel="mask-icon" href="/images/%E7%9A%AE%E5%8D%A1%E4%B8%98-2.ico" color="black"><link rel="alternate icon" href="/yun.ico"><link rel="preload" href="/css/hexo-theme-yun.css" as="style"><link rel="preload" href="/js/utils.js" as="script"><link rel="preload" href="/js/hexo-theme-yun.js" as="script"><link rel="prefetch" href="/js/sidebar.js" as="script"><link rel="preconnect" href="https://cdn.jsdelivr.net" crossorigin><link rel="stylesheet" href="/css/hexo-theme-yun.css"><link rel="alternate" href="/atom.xml" title="Lizikang_Blog"><script id="yun-config">
    const Yun = window.Yun || {};
    window.CONFIG = {"root":"/","title":["Li","Zi","Kang","Blog"],"version":"0.9.2","anonymous_image":"https://cdn.jsdelivr.net/gh/YunYouJun/cdn/img/avatar/none.jpg","say":{"api":"https://v1.hitokoto.cn","hitokoto":true},"fireworks":{"colors":["102, 167, 221","62, 131, 225","33, 78, 194"]}};
  </script><script src="//at.alicdn.com/t/font_1929835_1z6thct9lfe.js" async></script><meta name="description" content="第8讲 最小生成树、最短路、关键路径1.最小生成树  MST 无向图 不一定唯一 唯一条件： 任意环中边权都不同  (1) Prim  朴素： $O(n^2)$  稠密图   堆优化： $O(mlogn)$  稀疏图   少用 AcWing 858. Prim算法求最小生成树 S:当前已经在联通块中的所有点的集合  dist[i] &#x3D; inf for n 次找到不在s集合中，距离s集合最近的点t将">
<meta property="og:type" content="article">
<meta property="og:title" content="数据结构 第8讲 最小生成树、最短路、关键路径">
<meta property="og:url" content="http://yoursite.com/2021/08/07/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84/acwing/sjjg_5_2/index.html">
<meta property="og:site_name" content="Lizikang_Blog">
<meta property="og:description" content="第8讲 最小生成树、最短路、关键路径1.最小生成树  MST 无向图 不一定唯一 唯一条件： 任意环中边权都不同  (1) Prim  朴素： $O(n^2)$  稠密图   堆优化： $O(mlogn)$  稀疏图   少用 AcWing 858. Prim算法求最小生成树 S:当前已经在联通块中的所有点的集合  dist[i] &#x3D; inf for n 次找到不在s集合中，距离s集合最近的点t将">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210805173335984.png">
<meta property="og:image" content="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210805181407071.png">
<meta property="og:image" content="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210806160659990.png">
<meta property="og:image" content="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210806151105388.png">
<meta property="og:image" content="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210806151217433.png">
<meta property="og:image" content="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210806152213614.png">
<meta property="og:image" content="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210806151359247.png">
<meta property="og:image" content="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210806151438416.png">
<meta property="og:image" content="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210806151425436.png">
<meta property="og:image" content="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210806151510412.png">
<meta property="og:image" content="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210806151527963.png">
<meta property="og:image" content="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210806151537094.png">
<meta property="og:image" content="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210807093135980.png">
<meta property="og:image" content="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210807093237097.png">
<meta property="og:image" content="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210806151558118.png">
<meta property="og:image" content="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210807093942975.png">
<meta property="og:image" content="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210807100345267.png">
<meta property="og:image" content="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210806151619915.png">
<meta property="og:image" content="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210806151656567.png">
<meta property="og:image" content="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210806151714194.png">
<meta property="og:image" content="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210807094035578.png">
<meta property="og:image" content="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210806161738976.png">
<meta property="og:image" content="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210806161759548.png">
<meta property="og:image" content="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210807094626826.png">
<meta property="og:image" content="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210806161819799.png">
<meta property="og:image" content="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210806161830371.png">
<meta property="og:image" content="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210807095153193.png">
<meta property="og:image" content="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210806161855267.png">
<meta property="og:image" content="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210806161911055.png">
<meta property="article:published_time" content="2021-08-06T16:00:00.000Z">
<meta property="article:modified_time" content="2021-08-25T06:31:13.763Z">
<meta property="article:author" content="李子康">
<meta property="article:tag" content="数据结构">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210805173335984.png"><script src="/js/ui/mode.js"></script><link rel="alternate" href="/atom.xml" title="Lizikang_Blog" type="application/atom+xml">
</head><body><script defer src="https://cdn.jsdelivr.net/npm/animejs@latest/anime.min.js"></script><script defer src="/js/ui/fireworks.js"></script><canvas class="fireworks"></canvas><div class="container"><a class="sidebar-toggle hty-icon-button" id="menu-btn"><div class="hamburger hamburger--spin" type="button"><span class="hamburger-box"><span class="hamburger-inner"></span></span></div></a><div class="sidebar-toggle sidebar-overlay"></div><aside class="sidebar"><script defer src="/js/sidebar.js"></script><ul class="sidebar-nav"><li class="sidebar-nav-item sidebar-nav-toc hty-icon-button sidebar-nav-active" data-target="post-toc-wrap" title="文章目录"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-list-ordered"></use></svg></li><li class="sidebar-nav-item sidebar-nav-overview hty-icon-button" data-target="site-overview-wrap" title="站点概览"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-passport-line"></use></svg></li></ul><div class="sidebar-panel" id="site-overview-wrap"><div class="site-info fix-top"><a class="site-author-avatar" href="/about/" title="李子康"><img width="96" loading="lazy" src="/images/bak.jpg" alt="李子康"></a><div class="site-author-name"><a href="/about/">李子康</a></div><a class="site-name" href="/about/site.html">Lizikang_Blog</a><sub class="site-subtitle"></sub><div class="site-desciption">个人技术博客</div></div><nav class="site-state"><a class="site-state-item hty-icon-button icon-home" href="/" title="我的主页"><span class="site-state-item-icon"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-home-4-line"></use></svg></span></a><div class="site-state-item"><a href="/archives/" title="归档"><span class="site-state-item-icon"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-archive-line"></use></svg></span><span class="site-state-item-count">27</span></a></div><div class="site-state-item"><a href="/categories/" title="分类"><span class="site-state-item-icon"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-folder-2-line"></use></svg></span><span class="site-state-item-count">13</span></a></div><div class="site-state-item"><a href="/tags/" title="标签"><span class="site-state-item-icon"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-price-tag-3-line"></use></svg></span><span class="site-state-item-count">9</span></a></div><a class="site-state-item hty-icon-button" href="https://yun.yunyoujun.cn" target="_blank" rel="noopener" title="文档"><span class="site-state-item-icon"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-settings-line"></use></svg></span></a></nav><hr style="margin-bottom:0.5rem"><div class="links-of-author"><a class="links-of-author-item hty-icon-button" rel="noopener" href="https://wpa.qq.com/msgrd?v=3&amp;uin=1191787635&amp;site=qq&amp;menu=yes" title="QQ" target="_blank" style="color:#12B7F5"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-qq-line"></use></svg></a><a class="links-of-author-item hty-icon-button" rel="noopener" href="https://github.com/lizikanglzk" title="GitHub" target="_blank" style="color:#181717"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-github-line"></use></svg></a><a class="links-of-author-item hty-icon-button" rel="noopener" href="mailto:1191787635@qq.com" title="E-Mail" target="_blank" style="color:#8E71C1"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-mail-line"></use></svg></a><a class="links-of-author-item hty-icon-button" rel="noopener" href="https://gitee.com/li_zikang" title="gitee" target="_blank" style="color:#E6162D"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-gitee-copy"></use></svg></a><a class="links-of-author-item hty-icon-button" rel="noopener" href="https://music.163.com/#/user/home?id=506556053" title="网易云音乐" target="_blank" style="color:#C10D0C"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-netease-cloud-music-line"></use></svg></a><a class="links-of-author-item hty-icon-button" rel="noopener" href="https://blog.csdn.net/qq_43845915" title="csdn" target="_blank" style="color:#007722"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-csdn11"></use></svg></a><a class="links-of-author-item hty-icon-button" rel="noopener" href="https://www.zhihu.com/people/zou-guo-lu-guo-bu-yao-cuo-guo-88" title="知乎" target="_blank" style="color:#0084FF"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-zhihu-line"></use></svg></a><a class="links-of-author-item hty-icon-button" rel="noopener" href="https://space.bilibili.com/352594163" title="哔哩哔哩动画" target="_blank" style="color:#FF8EB3"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-bilibili-line"></use></svg></a><a class="links-of-author-item hty-icon-button" rel="noopener" title="微信" target="_blank" style="color:#1AAD19"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-wechat-2-line"></use></svg></a><a class="links-of-author-item hty-icon-button" rel="noopener" href="/atom.xml" title="RSS" target="_blank" style="color:orange"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-rss-line"></use></svg></a><a class="links-of-author-item hty-icon-button" rel="noopener" href="/game1" title="Telegram Channel" target="_blank" style="color:#0088CC"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-youxi-copy-copy"></use></svg></a><a class="links-of-author-item hty-icon-button" rel="noopener" href="https://travellings.now.sh/" title="Travelling" target="_blank" style="color:var(--hty-text-color)"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-send-plane-2-line"></use></svg></a></div><hr style="margin:0.5rem 1rem"><div class="links"><a class="links-item hty-icon-button" href="/links/" title="我的小伙伴们" style="color:dodgerblue"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-men-line"></use></svg></a><a class="links-item hty-icon-button" href="/girls/" title="我的老婆们" style="color:#FF8EB3"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-women-line"></use></svg></a></div><br><a class="links-item hty-icon-button" id="toggle-mode-btn" href="javascript:;" title="Mode" style="color: #f1cb64"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-contrast-2-line"></use></svg></a></div><div class="sidebar-panel sidebar-panel-active" id="post-toc-wrap"><div class="post-toc"><div class="post-toc-content"><ol class="toc"><li class="toc-item toc-level-3"><a class="toc-link" href="#第8讲-最小生成树、最短路、关键路径"><span class="toc-text">第8讲 最小生成树、最短路、关键路径</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#1-最小生成树-MST"><span class="toc-text">1.最小生成树  MST</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#2-最短路"><span class="toc-text">2.最短路</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#3-关键路径"><span class="toc-text">3.关键路径</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#4-考题：2011-41、2012-7、2012-8、2013-9、2015-6、2015-42、2016-8、2017-42、2018-42、2019-5、2020-7、2020-8"><span class="toc-text">4.考题：2011-41、2012-7、2012-8、2013-9、2015-6、2015-42、2016-8、2017-42、2018-42、2019-5、2020-7、2020-8</span></a></li></ol></li></ol></div></div></div></aside><main class="sidebar-translate" id="content"><div id="post"><article class="post-block" itemscope itemtype="https://schema.org/Article"><link itemprop="mainEntityOfPage" href="http://yoursite.com/2021/08/07/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84/acwing/sjjg_5_2/"><span hidden itemprop="author" itemscope itemtype="https://schema.org/Person"><meta itemprop="name" content="李子康"><meta itemprop="description"></span><span hidden itemprop="publisher" itemscope itemtype="https://schema.org/Organization"><meta itemprop="name" content="Lizikang_Blog"></span><header class="post-header"><h1 class="post-title" itemprop="name headline">数据结构 第8讲 最小生成树、最短路、关键路径</h1><div class="post-meta"><div class="post-time" style="display:inline-block"><span class="post-meta-item-icon"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-calendar-line"></use></svg></span> <time title="创建时间：2021-08-07 00:00:00" itemprop="dateCreated datePublished" datetime="2021-08-07T00:00:00+08:00">2021-08-07</time><span class="post-meta-divider">-</span><span class="post-meta-item-icon"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-calendar-2-line"></use></svg></span> <time title="修改时间：2021-08-25 14:31:13" itemprop="dateModified" datetime="2021-08-25T14:31:13+08:00">2021-08-25</time></div><span class="post-busuanzi"><span class="post-meta-divider">-</span><span class="post-meta-item-icon" title="阅读次数"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-eye-line"></use></svg> <span id="busuanzi_value_page_pv"></span></span></span><div class="post-classify"><span class="post-category"><span class="post-meta-item-icon"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-folder-line"></use></svg></span> <span itemprop="about" itemscope itemtype="https://schema.org/Thing"><a class="category" href="/categories/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84/" style="--text-color:var(--hty-text-color)" itemprop="url" rel="index"><span itemprop="text">数据结构</span></a></span> > <span itemprop="about" itemscope itemtype="https://schema.org/Thing"><a class="category" href="/categories/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84/acwing/" style="--text-color:var(--hty-text-color)" itemprop="url" rel="index"><span itemprop="text">acwing</span></a></span></span><span class="post-tag"><span class="post-meta-divider">-</span><a class="tag" href="/tags/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84/" style="--text-color:var(--hty-text-color)"><span class="post-meta-item-icon"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-price-tag-3-line"></use></svg></span><span class="tag-name">数据结构</span></a></span></div></div></header><section class="post-body" itemprop="articleBody"><div class="post-content markdown-body" style="--smc-primary:black;"><h3 id="第8讲-最小生成树、最短路、关键路径"><a href="#第8讲-最小生成树、最短路、关键路径" class="headerlink" title="第8讲 最小生成树、最短路、关键路径"></a>第8讲 最小生成树、最短路、关键路径</h3><h4 id="1-最小生成树-MST"><a href="#1-最小生成树-MST" class="headerlink" title="1.最小生成树  MST"></a>1.最小生成树  MST</h4><blockquote>
<p>无向图</p>
<p><strong>不一定唯一</strong></p>
<p>唯一条件： 任意环中边权都不同</p>
</blockquote>
<p>(1) Prim</p>
<blockquote>
<p>朴素： $O(n^2)$  稠密图  </p>
<p>堆优化： $O(mlogn)$  稀疏图   少用</p>
<p><a href="https://www.acwing.com/problem/content/860/" target="_blank" rel="noopener"><strong>AcWing 858. Prim算法求最小生成树</strong></a></p>
<p>S:当前已经在联通块中的所有点的集合</p>
<ol>
<li>dist[i] = inf</li>
<li>for n 次<br>找到不在s集合中，距离s集合最近的点t<br>将这个点t放入集合中<br>利用这个点t， 更新不在集合中的点</li>
</ol>
<p>联系：Dijkstra算法是更新到起始点的距离，Prim是更新到集合S的距离</p>
<p><strong>Prim算法与Dijkstra算法的区别</strong><br>Dijkstra算法是更新不在集合中的点 离起点的距离</p>
<p>dist[j]=min(dist[j], dist[t]+g[t][j])</p>
<p>Prim是更新不在集合中的点 离集合S的距离</p>
<p>dist[j] = min(dist[j], g[t][j])</p>
</blockquote>
<p>c++:</p>
<figure class="highlight c++"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br></pre></td><td class="code"><pre><code class="hljs c++"><span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;iostream&gt;</span></span><br><span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;cstring&gt;</span></span><br><span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;algorithm&gt;</span></span><br><br><span class="hljs-keyword">using</span> <span class="hljs-keyword">namespace</span> <span class="hljs-built_in">std</span>;<br><span class="hljs-keyword">const</span> <span class="hljs-keyword">int</span> N = <span class="hljs-number">505</span>, INF = <span class="hljs-number">0x3f3f3f3f</span>;<br><span class="hljs-keyword">int</span> n,m;<br><span class="hljs-keyword">int</span> g[N][N], dist[N]; <span class="hljs-comment">//dist存储其他点到S的距离</span><br><span class="hljs-keyword">bool</span> st[N];<br><br><br><span class="hljs-function"><span class="hljs-keyword">int</span> <span class="hljs-title">prim</span><span class="hljs-params">()</span></span>&#123;<br><br>    <span class="hljs-built_in">memset</span>(dist, <span class="hljs-number">0x3f</span>, <span class="hljs-keyword">sizeof</span> dist);<br>    dist[<span class="hljs-number">1</span>]=<span class="hljs-number">0</span>;<br>    <span class="hljs-keyword">int</span> res = <span class="hljs-number">0</span>;<br>    <span class="hljs-keyword">for</span>(<span class="hljs-keyword">int</span> i=<span class="hljs-number">0</span>;i&lt;n;i++) <span class="hljs-comment">// n个点</span><br>    &#123;<br>        <span class="hljs-comment">// 寻找离集合S最近的点  </span><br>        <span class="hljs-keyword">int</span> t  = <span class="hljs-number">-1</span> ;<br>        <span class="hljs-keyword">for</span>(<span class="hljs-keyword">int</span> j = <span class="hljs-number">1</span>; j &lt;=n ;j++)<br>            <span class="hljs-keyword">if</span>(!st[j] &amp;&amp; ( t==<span class="hljs-number">-1</span> || dist[t]&gt;dist[j] ) )<br>                t = j ; <span class="hljs-comment">// 更新t </span><br><br>        <span class="hljs-comment">// 当前可选的最短路径的点距离都是INF 说明不联通，return</span><br>        <span class="hljs-keyword">if</span>(dist[t] == INF ) <span class="hljs-keyword">return</span> INF;<br><br>        st[t]= <span class="hljs-literal">true</span>;<br><br>        res += dist[t];<br>        <span class="hljs-comment">//利用这个点t， 更新不在集合中的点</span><br>        <span class="hljs-keyword">for</span>(<span class="hljs-keyword">int</span> j = <span class="hljs-number">1</span>;j&lt;=n;j++)<br>            dist[j] = <span class="hljs-built_in">min</span>(dist[j],g[t][j]);<br><br><br>    &#125;<br><br>    <span class="hljs-keyword">return</span> res;<br>&#125;<br><br><span class="hljs-function"><span class="hljs-keyword">int</span> <span class="hljs-title">main</span><span class="hljs-params">()</span></span><br><span class="hljs-function"></span>&#123;<br>    <span class="hljs-built_in">cin</span>&gt;&gt;n&gt;&gt;m;<br>    <span class="hljs-built_in">memset</span>(g,<span class="hljs-number">0x3f</span>, <span class="hljs-keyword">sizeof</span> g);<br>    <span class="hljs-keyword">while</span> (m -- )&#123;<br>        <span class="hljs-keyword">int</span> a,b,c;<br>        <span class="hljs-built_in">cin</span>&gt;&gt;a&gt;&gt;b&gt;&gt;c;<br>        g[a][b] = g[b][a] = <span class="hljs-built_in">min</span>(g[a][b],c);<br>    &#125;<br>    <span class="hljs-keyword">int</span> res = prim();<br>    <span class="hljs-keyword">if</span>(res == INF) <span class="hljs-built_in">puts</span>(<span class="hljs-string">"impossible"</span>);<br>    <span class="hljs-keyword">else</span> <span class="hljs-built_in">cout</span>&lt;&lt;res&lt;&lt;<span class="hljs-built_in">endl</span>;<br><br>    <span class="hljs-keyword">return</span> <span class="hljs-number">0</span>;<br><br>&#125;<br></code></pre></td></tr></table></figure>

<p>(2) Kruskal</p>
<blockquote>
<p>并查集 笔试不考</p>
<p>$O(mlogn)$</p>
<p>看边权，每次看最小边权的边，加后是否形成环，不形成环可加</p>
</blockquote>
<h4 id="2-最短路"><a href="#2-最短路" class="headerlink" title="2.最短路"></a>2.最短路</h4><p><img src="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210805173335984.png" alt="image-20210805173335984" loading="lazy"></p>
<p>(1) 单源最短路 Dijkstra</p>
<p><a href="https://www.acwing.com/problem/content/851/" target="_blank" rel="noopener"><strong>AcWing 849. Dijkstra求最短路 I</strong></a></p>
<figure class="highlight c++"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br></pre></td><td class="code"><pre><code class="hljs c++"><span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;iostream&gt;</span></span><br><span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;cstring&gt;</span></span><br><span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;algorithm&gt;</span></span><br><br><span class="hljs-keyword">using</span> <span class="hljs-keyword">namespace</span> <span class="hljs-built_in">std</span>;<br><span class="hljs-keyword">const</span> <span class="hljs-keyword">int</span> N = <span class="hljs-number">505</span>,INF = <span class="hljs-number">0x3f3f3f3f</span>;<br><span class="hljs-keyword">int</span> n,m;<br><span class="hljs-keyword">int</span> g[N][N],dist[N];<br><span class="hljs-keyword">bool</span> st[N];<br><br><span class="hljs-function"><span class="hljs-keyword">int</span> <span class="hljs-title">dij</span><span class="hljs-params">()</span></span>&#123;<br><br>    <span class="hljs-built_in">memset</span>(dist, INF, <span class="hljs-keyword">sizeof</span> dist);<br>    dist[<span class="hljs-number">1</span>] = <span class="hljs-number">0</span>;<br>    <span class="hljs-keyword">for</span> (<span class="hljs-keyword">int</span> i = <span class="hljs-number">0</span>; i &lt; n; i ++ )&#123;<br>        <span class="hljs-comment">// n个点</span><br>        <span class="hljs-keyword">int</span> t  =<span class="hljs-number">-1</span> ;<br>        <span class="hljs-keyword">for</span>(<span class="hljs-keyword">int</span> j = <span class="hljs-number">1</span>;j&lt;=n;j++)&#123;<br>            <span class="hljs-keyword">if</span>( !st[j]&amp;&amp; (t==<span class="hljs-number">-1</span>|| dist[t]&gt;dist[j] ) )<br>            t = j;<br>        &#125;<br><br>        st[t] = <span class="hljs-literal">true</span>;<br><br>        <span class="hljs-comment">// 更新</span><br>        <span class="hljs-keyword">for</span> (<span class="hljs-keyword">int</span> j = <span class="hljs-number">1</span>; j &lt;= n; j ++ )&#123;<br><br>            dist[j] = <span class="hljs-built_in">min</span>(dist[j],dist[t]+ g[t][j]);<br><br>        &#125;<br><br><br><br>    &#125;<br><br>    <span class="hljs-keyword">return</span> dist[n];<br>&#125;<br><br><span class="hljs-function"><span class="hljs-keyword">int</span> <span class="hljs-title">main</span><span class="hljs-params">()</span></span><br><span class="hljs-function"></span>&#123;<br>    <span class="hljs-built_in">cin</span>&gt;&gt;n&gt;&gt;m;<br>    <span class="hljs-built_in">memset</span>(g, INF, <span class="hljs-keyword">sizeof</span> g);<br>    <span class="hljs-keyword">while</span> (m -- )&#123;<br>        <span class="hljs-keyword">int</span> a,b,c;<br>        <span class="hljs-built_in">cin</span>&gt;&gt;a&gt;&gt;b&gt;&gt;c;<br>        g[a][b] = <span class="hljs-built_in">min</span>(g[a][b],c);<br><br>    &#125;<br><br>    <span class="hljs-keyword">int</span> res = dij();<br>    <span class="hljs-keyword">if</span>(res == INF) <span class="hljs-built_in">puts</span>(<span class="hljs-string">"-1"</span>);<br>    <span class="hljs-keyword">else</span> <span class="hljs-built_in">cout</span>&lt;&lt;res&lt;&lt;<span class="hljs-built_in">endl</span>;<br><br><br>    <span class="hljs-keyword">return</span> <span class="hljs-number">0</span>;<br>&#125;<br></code></pre></td></tr></table></figure>

<p>(2) 多源汇最短路 Floyd</p>
<blockquote>
<p><a href="https://www.acwing.com/problem/content/856/" target="_blank" rel="noopener"><strong>AcWing 854. Floyd求最短路</strong></a></p>
<p>$O(n^3)$</p>
<p>实际上是dp的思想，笔试不考dp，了解算法即可</p>
<p>$d[i][j] = min(d[i][j], d[i][k] + d[k][j])$</p>
<p>1-&gt;2-&gt; 3  与 1-&gt;3 比较 ，更新</p>
</blockquote>
<figure class="highlight c++"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br></pre></td><td class="code"><pre><code class="hljs c++"><span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;iostream&gt;</span></span><br><span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;cstring&gt;</span></span><br><span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;algorithm&gt;</span></span><br><br><span class="hljs-keyword">using</span> <span class="hljs-keyword">namespace</span> <span class="hljs-built_in">std</span>;<br><span class="hljs-keyword">const</span> <span class="hljs-keyword">int</span> N = <span class="hljs-number">205</span>,INF = <span class="hljs-number">0x3f3f3f3f</span>;<br><span class="hljs-keyword">int</span> n,m,Q;<br><span class="hljs-keyword">int</span> d[N][N];<br><span class="hljs-function"><span class="hljs-keyword">int</span> <span class="hljs-title">main</span><span class="hljs-params">()</span></span><br><span class="hljs-function"></span>&#123;<br>    <br>    <br>    <span class="hljs-built_in">cin</span>&gt;&gt;n&gt;&gt;m&gt;&gt;Q;<br>    <br>    <span class="hljs-built_in">memset</span>(d, <span class="hljs-number">0x3f</span>, <span class="hljs-keyword">sizeof</span> d);<br>    <span class="hljs-keyword">for</span>(<span class="hljs-keyword">int</span> i = <span class="hljs-number">1</span>;i&lt;=n; i++ ) d[i][i] = <span class="hljs-number">0</span>;<br>    <br>    <span class="hljs-keyword">while</span> (m -- )&#123;<br>        <br>        <br>        <span class="hljs-keyword">int</span> a,b,c;<br>        <br>        <span class="hljs-built_in">cin</span>&gt;&gt;a&gt;&gt;b&gt;&gt;c;<br>        <br>        d[a][b] = <span class="hljs-built_in">min</span>(d[a][b],c);<br>        <br>        <br>    &#125;<br>    <br>    <span class="hljs-keyword">for</span>(<span class="hljs-keyword">int</span> k= <span class="hljs-number">1</span>;k&lt;=n;k++)<br>        <span class="hljs-keyword">for</span>(<span class="hljs-keyword">int</span> i = <span class="hljs-number">1</span>;i&lt;=n;i++)<br>            <span class="hljs-keyword">for</span>(<span class="hljs-keyword">int</span> j = <span class="hljs-number">1</span>;j&lt;=n;j++)<br>                d[i][j] = <span class="hljs-built_in">min</span>( d[i][j], d[i][k] + d[k][j] );<br>    <br>    <br>    <br>    <span class="hljs-keyword">while</span>(Q--)&#123;<br>        <span class="hljs-keyword">int</span> x,y;<br>        <span class="hljs-built_in">cin</span>&gt;&gt;x&gt;&gt;y;<br>        <span class="hljs-keyword">if</span>(d[x][y]&gt;INF/<span class="hljs-number">2</span>) <span class="hljs-built_in">puts</span>(<span class="hljs-string">"impossible"</span>);<br>        <span class="hljs-keyword">else</span> <span class="hljs-built_in">cout</span>&lt;&lt;d[x][y]&lt;&lt;<span class="hljs-built_in">endl</span>;<br>    &#125;<br>    <br>    <br>    <br>    <span class="hljs-keyword">return</span> <span class="hljs-number">0</span>;<br>&#125;<br></code></pre></td></tr></table></figure>



<h4 id="3-关键路径"><a href="#3-关键路径" class="headerlink" title="3.关键路径"></a>3.关键路径</h4><blockquote>
<p>拓扑排序的 运用</p>
<p>最长路    递推</p>
<p>点：事件、边：活动</p>
<p>事件最早开始时间</p>
<p>事件最晚开始时间</p>
<p>活动最早开始时间</p>
<p>活动最晚开始时间</p>
</blockquote>
<p><img src="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210805181407071.png" alt="image-20210805181407071" loading="lazy"></p>
<p><img src="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210806160659990.png" alt="image-20210806160659990" loading="lazy"></p>
<h4 id="4-考题：2011-41、2012-7、2012-8、2013-9、2015-6、2015-42、2016-8、2017-42、2018-42、2019-5、2020-7、2020-8"><a href="#4-考题：2011-41、2012-7、2012-8、2013-9、2015-6、2015-42、2016-8、2017-42、2018-42、2019-5、2020-7、2020-8" class="headerlink" title="4.考题：2011-41、2012-7、2012-8、2013-9、2015-6、2015-42、2016-8、2017-42、2018-42、2019-5、2020-7、2020-8"></a>4.考题：2011-41、2012-7、2012-8、2013-9、2015-6、2015-42、2016-8、2017-42、2018-42、2019-5、2020-7、2020-8</h4><p><strong>2011-41</strong></p>
<p><img src="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210806151105388.png" alt="image-20210806151105388" loading="lazy"></p>
<p><img src="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210806151217433.png" alt="image-20210806151217433" loading="lazy"></p>
<p><img src="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210806152213614.png" alt="" loading="lazy"></p>
<p><strong>2012-7</strong></p>
<p><img src="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210806151359247.png" alt="image-20210806151359247" loading="lazy"></p>
<blockquote>
<p>路径从小到大，</p>
<p>b:2,c:3,d:5,e:6,f:4</p>
<p>bcfde</p>
<p>选C</p>
</blockquote>
<p><strong>2012-8</strong></p>
<p><img src="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210806151438416.png" alt="image-20210806151438416" loading="lazy"></p>
<p><img src="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210806151425436.png" alt="image-20210806151425436" loading="lazy"></p>
<blockquote>
<p>A</p>
</blockquote>
<p><strong>2013-9</strong></p>
<p><img src="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210806151510412.png" alt="image-20210806151510412" loading="lazy"></p>
<blockquote>
<p>求关键路径，最长路径</p>
<p>bdcg</p>
<p>bdeh</p>
<p>bfh</p>
<p>选C</p>
</blockquote>
<p><strong>2015-6</strong></p>
<p><img src="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210806151527963.png" alt="image-20210806151527963" loading="lazy"></p>
<p><img src="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210806151537094.png" alt="image-20210806151537094" loading="lazy"></p>
<blockquote>
<p>Kruskal : 每次选最小边，加入看是否成环</p>
<p>Prime：选相邻最小边</p>
<p>Kruskal：第一次选5，第二次选8 </p>
<p><img src="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210807093135980.png" alt="image-20210807093135980" loading="lazy"></p>
<p>Prime：v4开始</p>
<p><img src="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210807093237097.png" alt="image-20210807093237097" loading="lazy"></p>
<p>（v2,v3）</p>
<p>选C</p>
</blockquote>
<p><strong>2015-42</strong></p>
<p><img src="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210806151558118.png" alt="image-20210806151558118" loading="lazy"></p>
<blockquote>
<p><img src="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210807093942975.png" alt="image-20210807093942975" loading="lazy"></p>
<p><img src="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210807100345267.png" alt="image-20210807100345267" loading="lazy"></p>
</blockquote>
<p><strong>2016-8</strong></p>
<p><img src="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210806151619915.png" alt="image-20210806151619915" loading="lazy"></p>
<blockquote>
<p>2:5 , 3: 7 , 4: 9, 5: 4 ,6:9</p>
<p>5、2、3、6、4</p>
<p>B</p>
</blockquote>
<p><strong>2017-42</strong></p>
<p><img src="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210806151656567.png" alt="image-20210806151656567" loading="lazy"></p>
<p><img src="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210806151714194.png" alt="image-20210806151714194" loading="lazy"></p>
<blockquote>
<p><img src="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210807094035578.png" alt="image-20210807094035578" loading="lazy"></p>
<p>2.唯一</p>
<p>3.唯一条件： 任意环中边权都不同</p>
</blockquote>
<p><strong>2018-42</strong></p>
<p><img src="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210806161738976.png" alt="" loading="lazy"></p>
<p><img src="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210806161759548.png" alt="image-20210806161759548" loading="lazy"></p>
<blockquote>
<p><img src="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210807094626826.png" alt="image-20210807094626826" loading="lazy"></p>
<p>2种情况  2 + 2 + 3+ 2+ 2+3+2 = 16</p>
<p>TTL 时间，就是问TL -&gt; BJ 距离长度 </p>
<p>方案一能到，方案二不能到。</p>
</blockquote>
<p><strong>2019-5</strong></p>
<p><img src="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210806161819799.png" alt="image-20210806161819799" loading="lazy"></p>
<p><img src="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210806161830371.png" alt="image-20210806161830371" loading="lazy"></p>
<blockquote>
<p>d 最早开始时间： 起点到d的最长路  8+ 4 = 12</p>
<p>最晚开始时间： 求最长路 (27) - 端点到终点最长路（6）-  路径（7） = 14</p>
<p><img src="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210807095153193.png" alt="image-20210807095153193" loading="lazy"></p>
</blockquote>
<p><strong>2020-7</strong></p>
<p><img src="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210806161855267.png" alt="image-20210806161855267" loading="lazy"></p>
<blockquote>
<p>Kruskal : 每次选最小边，加入看是否成环,不成环就能加。</p>
</blockquote>
<p><strong>2020-8</strong></p>
<p><img src="https://gitee.com/li_zikang/lzk-image/raw/master/img/image-20210806161911055.png" alt="image-20210806161911055" loading="lazy"></p>
<blockquote>
<p>边权和最大</p>
<p>C：如果只有一条关键路径</p>
<p>D： 有多条关键路径</p>
</blockquote>
</div></section></article><div class="post-nav"><div class="post-nav-item"><a class="post-nav-prev" href="/2021/08/27/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84/acwing/sjjg_6/" rel="prev" title="数据结构 第9讲 查找"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-arrow-left-s-line"></use></svg><span class="post-nav-text">数据结构 第9讲 查找</span></a></div><div class="post-nav-item"><a class="post-nav-next" href="/2021/07/31/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84/acwing/sjjg_5/" rel="next" title="数据结构 第7讲 图的基本概念、存储与遍历"><span class="post-nav-text">数据结构 第7讲 图的基本概念、存储与遍历</span><svg class="icon" aria-hidden="true"><use xlink:href="#icon-arrow-right-s-line"></use></svg></a></div></div></div><div id="comment"><div class="comment-tooltip text-center"></div><div id="valine-container"></div><script src="https://cdn.jsdelivr.net/npm/valine@latest/dist/Valine.min.js"></script><script>function initValine() {
  const valineConfig = {"enable":true,"appId":"q22e7srtjevOqYmzusWCYIru-gzGzoHsz","appKey":"PMyzTxHUFQ77nPj1IWMcMDK3","placeholder":"畅所欲言！","avatar":null,"meta":["nick","mail","link"],"pageSize":10,"visitor":false,"highlight":true,"recordIP":false,"enableQQ":true,"el":"#valine-container","lang":"zh-cn"}
  valineConfig.path = window.location.pathname
  new Valine(valineConfig)
}
setTimeout(initValine, 1000)</script></div></main><footer class="sidebar-translate" id="footer"><div class="copyright"><span>&copy; 2020 – 2022 </span><span class="with-love" id="animate"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-cloud-line"></use></svg></span><span class="author"> 李子康</span></div><div class="powered"><span>由 <a href="https://hexo.io" target="_blank" rel="noopener">Hexo</a> 驱动 v4.2.1</span><span class="footer-separator">|</span><span>主题 - <a rel="noopener" href="https://github.com/YunYouJun/hexo-theme-yun" target="_blank"><span>Yun</span></a> v0.9.2</span></div><div class="live_time"><span>本博客已萌萌哒地运行</span><span id="display_live_time"></span><span class="moe-text">(●'◡'●)</span><script>function blog_live_time() {
  window.setTimeout(blog_live_time, 1000);
  const start = new Date('2020-07-05T00:00:00');
  const now = new Date();
  const timeDiff = (now.getTime() - start.getTime());
  const msPerMinute = 60 * 1000;
  const msPerHour = 60 * msPerMinute;
  const msPerDay = 24 * msPerHour;
  const passDay = Math.floor(timeDiff / msPerDay);
  const passHour = Math.floor((timeDiff % msPerDay) / 60 / 60 / 1000);
  const passMinute = Math.floor((timeDiff % msPerHour) / 60 / 1000);
  const passSecond = Math.floor((timeDiff % msPerMinute) / 1000);
  display_live_time.innerHTML = " " + passDay + " 天 " + passHour + " 小时 " + passMinute + " 分 " + passSecond + " 秒";
}
blog_live_time();
</script></div><div id="busuanzi"><script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script><span id="busuanzi_container_site_uv" title="总访客量"><span><svg class="icon" aria-hidden="true"><use xlink:href="#icon-user-line"></use></svg></span><span id="busuanzi_value_site_uv"></span></span><span class="footer-separator">|</span><span id="busuanzi_container_site_pv" title="总访问量"><span><svg class="icon" aria-hidden="true"><use xlink:href="#icon-eye-line"></use></svg></span><span id="busuanzi_value_site_pv"></span></span></div></footer><a class="hty-icon-button" id="goUp" aria-label="back-to-top" href="#"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-arrow-up-s-line"></use></svg><svg class="progress-circle-container" viewBox="0 0 100 100"><circle class="progress-circle" id="progressCircle" cx="50" cy="50" r="48" fill="none" stroke="black" stroke-width="2" stroke-linecap="round"></circle></svg></a></div><script defer src="/js/utils.js"></script><script defer src="/js/hexo-theme-yun.js"></script><script defer src="/js/player.js"></script></body></html>